#pragma once
#include "Globals.h"
#include "BaseDrawable.h"
#include "BaseSprite.h"
#include "Button.h"
#include "Panel.h"

#define DXTEXTURE2 IDirect3DTexture9*
#define ID3DDEVICE IDirect3DDevice9

class Graphics2D
{
private:

	ID3DXSprite*	Sprite;						//Sprite Object	
	ID3DXFont*		FontDevice;					//Text Object

	char*			m_cszTexNames [TEX_SIZE];	//Name:	 Textures
	DXTEXTURE2		mdTextures	  [TEX_SIZE];	//Index: Textures
	D3DXVECTOR3		mdTexCenter	  [TEX_SIZE];	//Index: Texture Center Coordinates
	D3DXIMAGE_INFO	mdImageInfo	  [TEX_SIZE];	//Index: ImageInfo

	//=====SubFunction
	void LoadTexture (IDirect3DDevice9*,int,char*);
	bool InitTextures(IDirect3DDevice9*);
	void InitFont	 (IDirect3DDevice9*);



public:
	//=====INITIALIZE
	void Initialize	 (IDirect3DDevice9*);

	//=====RENDER
	void Render2D  (SpriteList&, int CurrentState);
	void RenderFont(BaseSprite*);
	
	//=====ACESSORS
	DXTEXTURE2 GetTexture(int ID);
};